package com.zhz.model.system;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhz.common.tool.mybatisplus.base.dal.annotation.BizKey;
import com.zhz.common.tool.mybatisplus.base.dal.entity.BasePO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 权限api
 * @author zhouhengzhe
 * @date 2023/3/21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "pe_permission_api")
public class PermissionApi extends BasePO {

    /**
     * 权限id
     */
    @BizKey
    @TableField(PID)
    private String pid;
    /**
     * 权限等级，1为通用接口权限，2为需校验接口权限
     */
    @TableField(API_LEVEL)
    private String apiLevel;

    /**
     * 请求类型
     */
    @TableField(API_METHOD)
    private String apiMethod;

    /**
     * 链接
     */
    @TableField(API_URL)
    private String apiUrl;

    public static final String PID = "pid";
    public static final String API_LEVEL = "api_level";

    public static final String API_METHOD = "api_method";

    public static final String API_URL = "api_url";
}